package org.finesys.quartz.convert;

import org.finesys.quartz.entity.SysJob;
import org.finesys.quartz.entity.SysJobLog;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface SysJobConvert {
    /**
     * 实例
     */
    public SysJobConvert INSTANCE = Mappers.getMapper(SysJobConvert.class);

    /**
     * 对象转换
     */
    @Mappings({
            @Mapping(target = "jobLogId", ignore = true),
            @Mapping(target = "jobMessage", ignore = true),
            @Mapping(target = "jobLogStatus", ignore = true),
            @Mapping(target = "executeTime", ignore = true),
            @Mapping(target = "exceptionInfo", ignore = true)
    }
    )
    public SysJobLog convert(SysJob sysJob);
}
